<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
	
	protected function _initSmarty() {
		
		$view = new App_Controller_View_Smarty ( APPLICATION_PATH . '/views/scripts' );
		$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'ViewRenderer' );
		$viewRenderer->setView ( $view )->setViewScriptPathSpec ( ':controller/:action.:suffix' )
										->setViewScriptPathNoControllerSpec ( ':action.:suffix' )
										->setViewSuffix ( 'tpl' );
		$view->base = "/nCMS/";
	}
	
	protected function _initDB()
	{
		$db = new Zend_Db_Adapter_Pdo_Mysql(array(
		    'host'     => 'localhost',
		    'username' => 'root',
		    'password' => '',
		    'dbname'   => 'ncms'
		));
		$db->getConnection();
		Zend_Registry::set("db", $db);
	}

}

